package com.atguigu.service.impl;

import com.atguigu.entities.User;
import com.atguigu.mapper.UserMapper;
import com.atguigu.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: bie
 * @create: 2021-07-12 13:59
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    // @Resource
    // private UserMapper userMapper;

    @Override
    public List<User> listAllByName(String name) {
        // 可以在 XxxServiceImpl 直接使用 baseMapper 代替 XxxMapper
        return baseMapper.findByName(name);
    }

}




